import React from 'react';
import './index.less';
import {base} from 'nc-lightapp-front';
import {render, connect} from 'src/hrpub/common/frame';
import DateAct from './action'
const {
    NCModal,
    NCButton,
    NCDatePicker
} = base;

const {
    Header: NCModalHeader,
    Body: NCModalBody,
    Footer: NCModalFooter
} = NCModal;
const Wrapper = render({
    actions: {
        dateAct: DateAct,
    },
    data: {
        effectDate: ''// 生效日期
    }
})(({props, state, action}) => {

    const {transfer} = props;

    return (
        <NCModal
            backdrop="static"
            show={transfer.excuteVisible}
            size="sm"
            className="excute-com"
            onHide={props.onClose}
            // onEntered={this.showHandle}
        >
            <NCModalHeader
                closeButton={true}
            >
                {transfer.language['gx6008-000091']}{/* 国际化处理： 执行*/}
            </NCModalHeader>
            <NCModalBody>
                <div className='datePicker'>
                    <NCDatePicker
                        value={state.effectDate}
                        className={'date-picker-com'}
                        placeholder={transfer.language["gx6008-000099"]}
                        onChange={action.dateAct.handelDateChange}
                    >
                    </NCDatePicker>
                </div>
            </NCModalBody>
            <NCModalFooter>
                <NCButton
                    colors="primary"
                    onClick={action.dateAct.execute}
                >
                    {transfer.language['gx6008-000024']}{/* 国际化处理： 确认*/}
                </NCButton>
                <NCButton
                    colors="secondary"
                    onClick={props.onClose}
                >
                    {transfer.language['gx6008-000025']}{/* 国际化处理： 取消*/}
                </NCButton>
            </NCModalFooter>
        </NCModal>
    );

});


export default connect(Wrapper);
